package com.huazhi.wzsnw.constant;

import com.huazhi.wzsnw.model.User;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

public class CommonUser {
    public static User getUser(){
        Subject subject = SecurityUtils.getSubject();
        User user =(User)subject.getPrincipal();
        System.out.println(user.getName()+"获取用户的名称");
        return user;
    }
}
